<?php

class UserStatus extends BaseModel
{
    public $res;
    public $expire;

    public function getSource()
    {
        return "f_user_status";
    }

    public function get_user($uid)
    {
        $info = $this->findFirstByUserId($uid);
        if (!$info) {
            $this->user_id = $uid;
            $this->save();
            $info = $this->findFirstByUserId($uid);
        }
        return $info;
    }

}
